quick question on seo

by: kingfitz, 8 years ago

Last edited: 8 years ago

yo, was wondering if you may know a quick way to add h1-4 tag processing to this seo function?  in this way my headline tags could possibly help boost search ratings, ie if someone searches 'web development, web design' I would have a better chance of getting a hit.  I can tell the function is working somewhat, when i search skylinedev .net it comes up first thing on Google, but I would like some keywords from those tags to be in the description of the search results.  Anyways I will look more into this, thanks.


@app.route('/sitemap.xml', methods=['GET'])
def sitemap():
    try:
      """Generate sitemap.xml. Makes a list of urls and date modified."""
      pages=[]
      ten_days_ago=(datetime.now() - timedelta(days=7)).date().isoformat()
      # static pages
      for rule in app.url_map.iter_rules():
          if "GET" in rule.methods and len(rule.arguments)==0:
              pages.append(
                           ["http://skylinedev.net"+str(rule.rule),ten_days_ago]
                           )

      sitemap_xml = render_template('sitemap_template.xml', pages=pages)
      response= make_response(sitemap_xml)
      response.headers["Content-Type"] = "application/xml"    
    
      return response
    except Exception as e:
        return(str(e))




You must be logged in to post. Please login or register an account.



I don't personally do more than what you've got there. Google very rarely will go with what you give it anymore, and I've never heard of it using your sitemap for those keywords, the sitemap is just used to find everything that may not be linked on your website. It'll take information from your page to come up with the description, not the sitemap. You can add a meta-description, but Google will determine whether or not to use it.

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.